//
//  Person.m
//  NSArray数组
//
//  Created by mir_yan on 2018/10/1.
//  Copyright © 2018年 hakeem. All rights reserved.
//

#import "Person.h"

@implementation Person

// 自定义对象表方法
- (NSComparisonResult)compareAge:(Person*)p {
    if (_age > p.age) {
        return NSOrderedDescending;
    } else if (_age < p.age) {
        return NSOrderedAscending;
    } else {
        return NSOrderedSame;
    }
}


@end
